package com.dream.springmvc.value;

import com.fasterxml.jackson.annotation.JsonCreator;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

/**
 * @author zhaoshichang
 */
@Data
@AllArgsConstructor
public class MultiSelectValue implements Value<List<String>> {
    private List<String> optionIds;

    @Override
    public List<String> getValue() {
        return optionIds;
    }

    @JsonCreator
    public static MultiSelectValue fromJson(List<String> val) {
        return new MultiSelectValue(val);
    }
}
